//
// Created by ziya on 2021/4/30.
//

#include "VMThread.h"
#include "../../../include/common.h"
#include "../../../include/gc/gc_factory.h"
#include "../../../share/vm/memory/Universe.h"
#include "../../../share/vm/memory/genCollectedHeap.h"

VM_Operation*     VMThread::_cur_vm_operation   = NULL;
VMOperationQueue* VMThread::_vm_queue           = NULL;

void VMThread::execute(VM_Operation *op) {
    INFO_PRINT("start gc...\n");

    GenCollectedHeap* heap = (GenCollectedHeap *)Universe::heap();

    heap->do_full_collection();
}

void VMThread::run() {
    this->loop();
}

void VMThread::loop() {

}

void VMThread::evaluate_operation(VM_Operation* op) {

}
